var express = require('express')
var path = require('path')
var session = require('express-session');
var app = express()
var setInterFace = require( './server/index')
app.use(express.static(path.join(__dirname, 'dist'))); // 使用静态文件位置   ---
app.set('trust proxy', 1) // trust first proxy
app.use(session({
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: true,
  cookie: { secure: true }
}))
setInterFace(app)
var server = app.listen(process.env.PORT || 8072)
console.log(8072)
